package com.njtoyo.taxi.admin.mapper.master.mapper;

import cn.hutool.core.lang.Dict;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njtoyo.taxi.admin.library.Const;
import com.njtoyo.taxi.admin.mapper.master.entity.SimpleCall;
import com.njtoyo.taxi.admin.rest.presenter.business.ride.call.RealTimeSinglePagePresenter;
import com.njtoyo.taxi.admin.rest.wrapper.business.ride.CallWrapper;
import com.njtoyo.taxi.admin.rest.wrapper.business.ride.CallWrapperDto;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 一键叫车表 Mapper 接口
 * </p>
 *
 * @author Dell
 * @since 2021-09-24
 */
@Repository
@DS(Const.PRIMARY_DS)
public interface SimpleCallMapper extends BaseMapper<SimpleCall> {

    List<Dict> getHisoryOriginTop3ByPhone(@Param("phone") String phone);

    Dict getReCallInfo(@Param("callId") Long callId);

    Page<RealTimeSinglePagePresenter> selectCallPage(CallWrapper wrapper);

    List<RealTimeSinglePagePresenter> exportCallList(CallWrapperDto wrapper);
}
